<template>
    <van-tabbar v-model="active">
        <van-tabbar-item icon="home-o" @click="link('/home')">明细</van-tabbar-item>
        <van-tabbar-item icon="search" @click="link('/data')">统计</van-tabbar-item>
        <van-tabbar-item icon="friends-o" @click="link('/user')">我的</van-tabbar-item>
    </van-tabbar>
</template>

<script>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
export default {
    props:{
        msg:String
    },  
    setup() {
        const router = useRouter();
        const active = ref(0);

        const link = (path) => {
            router.push({ path })
        }
        return {
            active,
            link
        }
    }
}
</script>

<style lang="scss" scoped>

</style>